package com.winit.openapi.chinapost.constants;

/**
 * 状态常量类
 * 
 * @version <pre>
 * Author	Version		Date		Changes
 * yu.zhang 	1.0  		2015-2-1 	Created
 * 
 * </pre>
 * @since 1.
 */
public final class StatusContants {

    // 订单状态
    public enum ISPOrderStatus {
        /** 未提交 */
        PD("PD", "Pending"),
        /** 确认发货 */
        WFR("WFR", "Waiting For Receiving"),
        /** 已揽收 */
        CFS("CFS","Collected from Sender"),
        /** 收货验货 */
        WFI("WFI", "Waitting For Inspect"),
        /** 已打包 */
        PC("PC", "Package Completes"),
        /** 已出库 */
        AO("AO", "Already Outbound"),
        /** 移交邮局 */
        HPO("HPO", "Hand Over Post Office"),
        /** 派送中 */
        DLI("DLI", "Delivering"),
        /** 派送完成 */
        DLC("DLC", "Delivered Completes"),
        /** 作废 */
        VO("VO", "Void"),
        /** 派送失败 */
        DLF("DLF", "Delivered Failed");

        private String status;
        private String desc;

        ISPOrderStatus(String status, String desc){
            this.status = status;
            this.desc = desc;
        }

        public String getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }

    }

    // 发货通知单状态
    public enum cusReturnAddressStatus {
        // 01去揽收
        Taking("01", "Taking"),
        // 02不去揽收
        UnTaking("02", "Refused to take");

        private String status;
        private String desc;

        cusReturnAddressStatus(String status, String desc){
            this.status = status;
            this.desc = desc;
        }

        public String getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }

    }
    
    // 客户揽收确认反馈状态
    public enum DispatchNoticeStatus {
        // 未提交
        UnSubmit("US", "UnCommitted"),
        // 等待收件
        WaitReceive("WR", "Waiting for delivery"),
        // 已揽收
        Received("RD", "Received by Winit"),
        // 作废
        Void("VO", "Void");

        private String status;
        private String desc;

        DispatchNoticeStatus(String status, String desc){
            this.status = status;
            this.desc = desc;
        }

        public String getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }

    }
    
    // 发货通知单状态
    public enum ISPOrderException {
        // 其他错误
        OTEX("OTEX", "OTEX"), 
        NormalOrder("10","正常订单"), 
        PackingProblem("11","包装问题"),
        Overweight("12","超重/超规"),
        DangerousGoods("13","超重/超规"),
        LabelProblem("14","单号/标签问题"),
        SystemProblems("15","系统问题"),
        ZipCodeProblem("16","邮编问题"),
        LessGoods("17","Less goods"),
        RequestFasteners("18","客户要求扣件"),
        UnownedThing("19","无主件"),
        CancelTheOrder("20","卖家线下取消订单"),
        Damage("21","库内破损"),
        SecurityCheckFailed("22","收寄安检不通过"),
        HkSecurityCheckFailed("23","航空安检不通过"),
        Other("24","其他问题");
        
        private String status;
        private String desc;

        ISPOrderException(String status, String desc){
            this.status = status;
            this.desc = desc;
        }
        // 普通方法
        public static String getName(String status) {
            for (ISPOrderException c : ISPOrderException.values()) {
                if (c.getStatus() == status) {
                    return c.desc;
                }
            }
            return null;
        }

        public String getStatus() {
            return status;
        }

        public String getDesc() {
            return desc;
        }

    }
     

}
